cmake_minimum_required(VERSION 3.5)
project(LeChart VERSION 0.1 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

# qDebug控制台输出 对集成终端无效
#set(ENV{QT_ASSUME_STDERR_HAS_CONSOLE} ON)
#message(STATUS $ENV{QT_ASSUME_STDERR_HAS_CONSOLE})

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)


# 添加QT5/6基本模块
find_package(QT NAMES Qt5 Qt6 REQUIRED)
# 添加QT5/6指定模块
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets Charts)

message(STATUS "qt version: ${QT_VERSION_MAJOR}")
message(STATUS "qt dir: ${Qt${QT_VERSION_MAJOR}_DIR}")

#message(STATUS $ENV{QT_ASSUME_STDERR_HAS_CONSOLE})

add_subdirectory(src/main/cpp)

